package testSudoku;
import static org.junit.Assert.*;
import org.junit.Before; 
import org.junit.Test;
import sudoku.*;

//testing the first question in easy level.
public class sudokuTest_10To15 {
	private Manager Man;
	/**
	 * Sets up the test fixture.
	 * Called before every test case method.
	 */
	@Before
	public void setUp()
	{
		//the first number(difficulty) should be >=1 and <=3
		Man = new Manager(1,0); 
	}
	/**
	 * Tears down the test fixture.
	 * Called after every test case method.
	 */
	public void tearDown() {}
	
	

	// Test case 10: not Duplicate N in row
	@Test
	public void testNnotDuplicateRow() {
		boolean result;
		int x = 0;
		int y = 4;
		String input = "1";
		char i = '1';
		result = Man.validate_input(x , y ,input, i,0);
		assertEquals(result, true);
	}

	// Test case 11: not Duplicate N in column
	@Test
	public void testNnotDuplicateColumn1() {
		boolean result;
		int x = 4;
		int y = 0;
		String input = "5";
		char i = '5';
		result = Man.validate_input(x , y ,input, i,0);
		assertEquals(result, true);
	}


	// Test case 12: hint is available
	@Test
	public void testhint1() {
		boolean result;
		result = Man.hint_ava();
		assertEquals(result, true);
	}

	// Test case 14: can get hint for 2 time
	@Test
	public void testhint2() {
		boolean result;
		Man.get_hint();
		Man.get_hint();
		result = Man.hint_ava();
		assertEquals(result, true);
	}

	// Test case 15: can get hint for 3 times only
	@Test
	public void testhint3() {
		boolean result;
		Man.get_hint();
		Man.get_hint();
		Man.get_hint();
		result = Man.hint_ava();
		assertEquals(result, false);
	}
	@Test 
	public void testhint4()
	{
		boolean result;
		Man.get_hint();
		Man.get_hint();
		Man.get_hint();
		Man.get_hint();
		result=Man.hint_ava();
		assertEquals(result,false);
	}
	
}